<?php
$objConnect = mysql_connect("localhost","root","01332") or die("Error Connect to Database");
$objDB = mysql_select_db("prj_sms");
$strSQL = "SELECT * FROM sale";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$datay=array();
while($objResult = mysql_fetch_array($objQuery))
{
$datay[] = $objResult["sale_id"]; 
}

print_r($datay);

?>